﻿<%@ Page Language="C#" MasterPageFile="~/admin/MasterPage_Admin.master" AutoEventWireup="true"
    CodeFile="ads_modi.aspx.cs" ValidateRequest="false" Inherits="admin_ads_modi"
    Title="IT110：不良信息举报与检索平台 - 广告信息管理 - By ECountry.Ltd" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder_Search" runat="Server">
    <%--<asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
    --%>
    <div style="width: 100%; text-align: center">
        <asp:Label ID="Label1" runat="server" Text="**综合广告信息管理中心**" Font-Bold="True" Font-Size="Large"
            ForeColor="#000066"></asp:Label>
    </div>
    <%--               请选择广告位置类型：
    --%>
    <%--<asp:ObjectDataSource ID="ObjectDataSource_Ads_Type" runat="server" 
                OldValuesParameterFormatString="original_{0}" 
                SelectMethod="Get_Data_Order_By_Id" 
                TypeName="DataSet_fp_ads_DyhTableAdapters.Dyh_ADS_positionTableAdapter">
            </asp:ObjectDataSource>--%>
    <br>
    <asp:FormView ID="FormView1" runat="server" DataKeyNames="id" DataSourceID="ObjectDataSource1"
        DefaultMode="Edit" Width="100%" OnDataBound="FormView1_DataBound" OnItemUpdating="FormView1_ItemUpdating"
        OnItemUpdated="FormView1_ItemUpdated">
        <EditItemTemplate>
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">
                <tr class="header">
                    <td colspan="4">
                        【<%# Eval("position") %>】位置广告信息管理
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        <center>
                            <%# Eval("content") %></center>
                    </td>
                </tr>
                <tr class="altbg1">
                    <td width="12%">
                        广告位置：
                    </td>
                    <td>
                        <asp:Label ID="Label2" runat="server" Text='<%# Eval("position") %>' Font-Bold="True"></asp:Label>
                        <%--<asp:DropDownList ID="DropDownList_type" runat="server" AutoPostBack="True" 
                DataSourceID="ObjectDataSource_Ads_Type" DataTextField="position" 
                DataValueField="id">
                   <asp:ListItem Selected="True" Value="0">==全部==</asp:ListItem>
               </asp:DropDownList>--%>
                    </td>
                    <td>
                        <%--广告标签：--%>
                    </td>
                    <td>
                        <%--<input name="mspace" type="text" value="{ok881com_ads<%=n%>}" size="30" onMouseOver="this.focus()" onFocus="this.select()">--%>
                        <%--<input type="button" class="button" name="getcode" value="复制标签代码" onclick="JM_cc('mspace')">--%>
                    </td>
                </tr>
                <tr class="altbg1">
                    <td>
                        &nbsp;
                    </td>
                    <td colspan="3">
                        规格：<asp:Label ID="Label_width" runat="server" Text='<%# Eval("width") %>' Font-Bold="True"></asp:Label>×<asp:Label
                            ID="Label_height" runat="server" Text='<%# Eval("height")%>' Font-Bold="True"></asp:Label>
                        px (用于图片和flash)<br>
                        收费标准：<asp:Label ID="Label3" runat="server" Text='<%# Eval("cost") %>' Font-Bold="True"></asp:Label>
                        RMB/月<br />
                        说明：<%# Eval("description") %>
                    </td>
                </tr>
                <tr class="altbg1">
                    <td>
                        广告类型：
                    </td>
                    <td colspan="3">
                        <asp:RadioButtonList ID="RadioButtonList_type" runat="server" RepeatDirection="Horizontal"
                            SelectedValue='<%# Bind("type") %>' OnSelectedIndexChanged="RadioButtonList_type_SelectedIndexChanged"
                            AutoPostBack="True">
                            <asp:ListItem Value="1">图片</asp:ListItem>
                            <asp:ListItem Value="2">Flash</asp:ListItem>
                            <asp:ListItem Value="3">文字</asp:ListItem>
                            <asp:ListItem Value="4">代码 
                            </asp:ListItem>
                        </asp:RadioButtonList>
                        <%--     
      <input class=radio name="open" type=radio value=true <%if r("open")=true then%>checked<%end if%>>
        是
        <input class=radio name="open" type=radio value=false <%if r("open")=false then%>checked<%end if%>>
        否--%>
                    </td>
                </tr>
                <tr class="altbg1">
                    <td>
                        是否开放：
                    </td>
                    <td colspan="3">
                        <asp:RadioButtonList ID="RadioButtonList2" runat="server" RepeatDirection="Horizontal"
                            SelectedValue='<%# Bind("Isopen") %>'>
                            <asp:ListItem Value="True">是</asp:ListItem>
                            <asp:ListItem Value="False">否</asp:ListItem>
                        </asp:RadioButtonList>
                        <%--     
      <input class=radio name="open" type=radio value=true <%if r("open")=true then%>checked<%end if%>>
        是
        <input class=radio name="open" type=radio value=false <%if r("open")=false then%>checked<%end if%>>
        否--%>
                    </td>
                </tr>
                <asp:Panel ID="Panel_address" runat="server">
                    <tr>
                        <%--id="ads_address" runat="server"--%>
                        <td>
                            广告地址：
                        </td>
                        <td colspan="3">
                            <asp:TextBox ID="txtoraddressTextBox" runat="server" Columns="25" Text='<%# Bind("txtoraddress") %>'
                                Height="20px" />
                            <%--<asp:Panel ID="Panel_fileupload" runat="server">--%>
                            <asp:FileUpload ID="MyFileUpload" runat="server" Height="24px" />
                            <asp:Button ID="Button_fileUpload" runat="server" OnClick="Button_fileUpload_Click"
                                Text="上传" />
                            <asp:Label ID="Label_Msg" runat="server"></asp:Label>
                            <%--</asp:Panel>--%>
                            <br>
                            **图片地址或文字内容,(分页广告地址必须加“<span class="style1">../</span>”)
                        </td>
                    </tr>
                </asp:Panel>
                <asp:Panel ID="Panel_url" runat="server">
                    <tr>
                        <%--id="ads_url" runat=server--%>
                        <td>
                            广告链接：
                        </td>
                        <td colspan="3">
                            <asp:TextBox ID="urlTextBox" runat="server" Columns="60" Text='<%# Bind("url") %>' />
                            <br>
                            **图片和文字的链接,flash和自写代码不用填
                        </td>
                    </tr>
                </asp:Panel>
                <asp:Panel ID="Panel_code" runat="server">
                    <tr>
                        <%--id="ads_code" runat=server--%>
                        <td>
                            自写代码：
                        </td>
                        <td colspan="3">
                            <asp:TextBox ID="contentTextBox" runat="server" Columns="70" Rows="5" Text='<%# Bind("content") %>'
                                TextMode="MultiLine" /><br>
                            **只用于自写代码。
                        </td>
                    </tr>
                </asp:Panel>
                <%--<tr class="altbg1">
      <td>广告大小：</td><td colspan="3"> 长
        宽
        只用于图片和flash,其他不用填。</td>
    </tr>--%>
                <tr class="altbg1">
                    <td>
                        广告说明：
                    </td>
                    <td colspan="3">
                        <asp:TextBox ID="noteTextBox" runat="server" Columns="58" Text='<%# Bind("note") %>' />
                        &nbsp;
                    </td>
                </tr>
                <%--    <tr class="altbg1">
      <td>收费标准：</td><td colspan="3">
      　</td>
    </tr>
                --%>
                <tr class="altbg1">
                    <td>
                        是否已租：
                    </td>
                    <td colspan="3">
                        <asp:RadioButtonList ID="RadioButtonList3" runat="server" RepeatDirection="Horizontal"
                            SelectedValue='<%# Bind("Issale") %>'>
                            <asp:ListItem Value="True">是</asp:ListItem>
                            <asp:ListItem Value="False">否</asp:ListItem>
                        </asp:RadioButtonList>
                        <%--      <input class=radio name="sale" type=radio value=true <%if r("sale")=true then%>checked<%end if%>>
        是
        <input class=radio name="sale" type=radio value=false <%if r("sale")=false then%>checked<%end if%>>
        否--%>
                    </td>
                </tr>
                <tr class="altbg1">
                    <td>
                        租用时间：
                    </td>
                    <td colspan="3">
                        <%--<Input class=button onClick="fPopUpCalendarDlg(starttime);return false" type=button value="选择" name=Submit>--%>
                        <%--<input name="starttime" type="text" id="starttime" value="<%=r("starttime")%>" size="12" id=name3 >--%>
                        <asp:TextBox ID="starttimeTextBox" runat="server" Text='<%# Bind("starttime") %>'
                            Columns="20" />
                        至
                        <%--<input name="endtime" type="text" id="endtime" value="<%=r("endtime")%>" size="12">--%>
                        <%--<Input  class=button onClick="fPopUpCalendarDlg(endtime);return false" type=button value="选择" name=Submit>--%>
                        <asp:TextBox ID="endtimeTextBox" runat="server" Text='<%# Bind("endtime") %>' Columns="20" />
                    </td>
                </tr>
                <tr class="altbg1">
                    <td>
                        <%--<a class=button href="ads_manage.aspx">返回管理</a>--%>
                    </td>
                    <td colspan="3">
                        <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
                            Text="确认修改" />
                        &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False"
                            CommandName="Cancel" Text="重新设定" />
                        <%--<input class=button type="submit" name="Submit" value="确认修改">
&nbsp;&nbsp;&nbsp;
        <input class=button type="reset" name="Submit2" value="重新设定">--%>
                    </td>
                </tr>
                <!--    <tr class="header">
      <td colspan="4">其它选项：</td></tr>
    <tr class="altbg1">
      <td colspan="4"><a class=button href="?action=del&n=<%--<%=n%>--%>">删除该广告</a> <a class=button href="?action=makejs&n=<%--<%=n%>--%>">生成广告Ｊｓ</a></td>
    </tr>
    <tr class="altbg1">
      <td colspan="4">
  该广告的Js调用代码（使用JS调用广告时将下面的代码添加到相应位置即可，使用广告标签时则忽略此项）</td>
     </tr>
   <tr class="altbg1">
<td colspan="4">  

<input name="adjs" type="text" id="adjs" value='<script language=javascript src="http://<%--<%=Request.ServerVariables("HTTP_HOST")%>--%>/js/adurl<%--<%=n%>--%>.js"></script>' size="100" onMouseOver="this.focus()" onFocus="this.select()">
<input type="button" class="button" name="getcode" value="复制代码" onclick="JM_cc('adjs')">

    </tr>-->
            </table>
        </EditItemTemplate>
    </asp:FormView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
        SelectMethod="Get_Data_By_ADSID_For_Admin" TypeName="DataSet_fp_ads_DyhTableAdapters.Dyh_ADTableAdapter"
        UpdateMethod="Update_Query_For_Admin">
        <UpdateParameters>
            <asp:Parameter Name="type" Type="Byte" />
            <asp:Parameter Name="content" Type="String" />
            <asp:Parameter Name="note" Type="String" />
            <asp:Parameter Name="Issale" Type="Boolean" />
            <asp:Parameter Name="Isopen" Type="Boolean" />
            <asp:Parameter Name="starttime" Type="DateTime" />
            <asp:Parameter Name="endtime" Type="DateTime" />
            <asp:Parameter Name="tag" Type="String" />
            <asp:Parameter Name="url" Type="String" />
            <asp:Parameter Name="txtoraddress" Type="String" />
            <asp:Parameter Name="times" Type="Int32" />
            <asp:Parameter Name="userid" Type="Int32" />
            <asp:Parameter Name="Original_id" Type="Int32" />
        </UpdateParameters>
        <SelectParameters>
            <asp:QueryStringParameter Name="adsid" QueryStringField="adsid" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <%--          </ContentTemplate>
    </asp:UpdatePanel>
    --%>
</asp:Content>
